Videos hosted on the internet can be viewed on many commercially available electronic devices such as smart phones, tablets, e-readers, computers, personal digital assistants, personal media players, etc. One way to view a video is to download the entirety of a video file and once complete, view the video file using video playing software installed on the electronic device. For long videos or high definition videos, downloading an entire video file can be time consuming and significantly delay a user from beginning to watch the video. One way to begin viewing the video without having to first download the entire video is through video streaming. In video streaming, portions of the video file can be provided piecemeal allowing the end user to begin playback of the video prior to having downloaded the entire video.
One method of video streaming is adaptive streaming. Adaptive streaming is a technique that can detect a user's connection speed to the internet, an available bandwidth, or CPU capacity and use those measurements to select the highest quality video stream that the user is capable of playing. One way to provide adaptive streaming is to host multiple video files of the same video that are capable of streaming, where the files are encoded using different bit rates, different frame rates, different resolutions, etc. A server or client device can then select the appropriate video file to stream based on the client. In addition, throughout playback of the video, if a user's connection speed for example changes, adaptive streaming provides for changing the stream the user is viewing to provide seamless playback under changing conditions. Thus, it can be important to know the bandwidth required for successful playback of each of the multiple video files prior to initially selecting a stream or during playback when switching streams under changing conditions.
Media files usually compress video frames to different sizes based on characteristics of source media and encoding parameters. Video frame sizes (in bits) can vary greatly from one frame to the next or from one set of frames to the next. Typically a media file is described by a bandwidth requirement averaged over the entire file. This average can be very different than a bandwidth requirement associated with one particular frame or a contiguous set of frames, which can potentially lead to intermittently poor streaming quality.